projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da9f725
)
When lrtrimming a zero-length string, return before we get a chance to walk past...
author
robertl
<robertl>
Thu, 23 Nov 2006 03:31:40 +0000
(
03:31
+0000)
committer
robertl
<robertl>
Thu, 23 Nov 2006 03:31:40 +0000
(
03:31
+0000)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 34d61e2bf7856d0d9e4fc39139454faa6ecb2268..2ff419df2244036b2a8af6b2f6afc2f3d7fc2f09 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-421,6
+421,9
@@
lrtrim(char *buff)
{
char *c;
+ if (buff[0] == '\0')
+ return buff;
+
c = buff + strlen(buff);
while ((c >= buff) && ((unsigned char)*c <= ' ')) *c-- = '\0';